<%@ page contentType="text/html;charset=UTF-8" %>
<style>
.main-sidebar, .left-side{top:50px;}
</style>
  <!-- Left side column. contains the logo and sidebar -->
  <aside class="main-sidebar">
    <!-- sidebar: style can be found   in sidebar.less -->
    <section class="sidebar">
      <!-- Sidebar user panel -->
      <div class="user-panel">
        <div class="pull-left image">
<%--          <img src="${version}/dist/img/user2-160x160.jpg" class="img-circle" alt="User Image">--%>
          
          <c:if test="${empty loginUser.user.userRemark}">
		        <img src="${ctx}/images/plateform/person2.png" class="img-circle"/>
		  </c:if>
		  <c:if test="${!empty loginUser.user.userRemark}">
		       <img src="${loginUser.user.userRemark}" class="img-circle"/>
		  </c:if>
          
        </div>
        <div class="pull-left info">
          <p>${loginUser.userCname}</p>
          <a href="#"><i class="fa fa-circle text-success"></i> Online</a>
        </div>
      </div>
      <!-- sidebar menu: : style can be found in sidebar.less -->
      <ul class="sidebar-menu">
        <li class="header"></li>
        
		<li class="treeview " userKey="">
			<a href="javascript:void('0');">
			<i class="fa fa-cog"></i> <span>数据库</span><i class="fa fa-angle-left pull-right"></i>
			</a>
			<ul class="treeview-menu" >
				<li id="objName-table" class="" userKey=""><a data-pjax="true" href="${ctx}/sendPage/plateform/admin/sort/objName-table"><i class="fa fa-circle-o"></i>表设计</a></li>
			</ul>
		</li>
		<li class="treeview " userKey="">
			<a href="javascript:void('0');">
			<i class="fa fa-cog"></i> <span>模块</span><i class="fa fa-angle-left pull-right"></i>
			</a>
			<ul class="treeview-menu" >
				<li id="sysModule-list" class="" userKey=""><a data-pjax="true" href="${ctx}/sendPage/plateform/admin/module/sysModule-list"><i class="fa fa-circle-o"></i>模块管理</a></li>
			</ul>
		</li>
		<li class="treeview " userKey="">
			<a href="javascript:void('0');">
			<i class="fa fa-cog"></i> <span>系统管理</span><i class="fa fa-angle-left pull-right"></i>
			</a>
			<ul class="treeview-menu" >
				<li id="task-list" class="" userKey=""><a data-pjax="true" href="${ctx}/sendPage/plateform/admin/timetask/task-list"><i class="fa fa-circle-o"></i>定时任务管理</a></li>
				<li id="protocol-list" class="" userKey=""><a data-pjax="true" href="${ctx}/sendPage/plateform/admin/user/protocol-list"><i class="fa fa-circle-o"></i>接口注册</a></li>
				<li id="log-operation-list" class="" userKey=""><a data-pjax="true" href="${ctx}/sendPage/plateform/admin/user/log-operation-list"><i class="fa fa-circle-o"></i>审计查询</a></li>
				<li id="sys-list" class="" userKey=""><a data-pjax="true" href="${ctx}/sendPage/plateform/admin/org/sys-list"><i class="fa fa-circle-o"></i>系统注册</a></li>
				<li id="log-model-list" class="" userKey=""><a data-pjax="true" href="${ctx}/sendPage/plateform/admin/user/log-model-list"><i class="fa fa-circle-o"></i>审计模型管理</a></li>
				<li id="bank-list" class="" userKey=""><a data-pjax="true" href="${ctx}/sendPage/plateform/admin/user/bank-list"><i class="fa fa-circle-o"></i>银行列表</a></li>
			</ul>
		</li>
		<li class="treeview " userKey="">
			<a href="javascript:void('0');">
			<i class="fa fa-cog"></i> <span>工具</span><i class="fa fa-angle-left pull-right"></i>
			</a>
			<ul class="treeview-menu" >
				<li id="dict-list" class="" userKey=""><a data-pjax="true" href="${ctx}/sendPage/plateform/admin/dict/dict-list"><i class="fa fa-circle-o"></i>系统代码集</a></li>
				<li id="sys-dict-list" class="" userKey=""><a data-pjax="true" href="${ctx}/sendPage/plateform/admin/dict/sys-dict-list"><i class="fa fa-circle-o"></i>通用代码集</a></li>
				<li id="sysConstant-list" class="" userKey=""><a data-pjax="true" href="${ctx}/sendPage/plateform/admin/rule/sysConstant-list"><i class="fa fa-circle-o"></i>变量管理</a></li>
				<li id="tools-websocket" class="" userKey=""><a data-pjax="true" href="${ctx}/sendPage/plateform/admin/tools/websocket"><i class="fa fa-circle-o"></i>websocket</a></li>
				<li id="workday" class="" userKey=""><a data-pjax="true" href="${ctx}/sendPage/plateform/admin/workday/index"><i class="fa fa-circle-o"></i>工作日管理</a></li>
			</ul>
		</li>
		<li class="treeview " userKey="">
			<a href="javascript:void('0');">
			<i class="fa fa-cog"></i> <span>插件</span><i class="fa fa-angle-left pull-right"></i>
			</a>
			<ul class="treeview-menu" >
<%--				<li id="rule-list" class="" userKey=""><a data-pjax="true" href="${ctx}/sendPage/plateform/admin/rule/rule-list"><i class="fa fa-circle-o"></i>插件组合</a></li>--%>
				<li id="sysPluginGroup-list" class="" userKey=""><a data-pjax="true" href="${ctx}/sendPage/plateform/admin/rule/sysPluginGroup-list"><i class="fa fa-circle-o"></i>插件组合</a></li>
<%--				<li id="plugin-list" class="" userKey=""><a data-pjax="true" href="${ctx}/sendPage/plateform/admin/rule/plugin-list"><i class="fa fa-circle-o"></i>单一插件</a></li>--%>
				<li id="sysPluginManager-list" class="" userKey=""><a data-pjax="true" href="${ctx}/sendPage/plateform/admin/rule/sysPluginManager-list"><i class="fa fa-circle-o"></i>单一插件</a></li>
			</ul>
		</li>
		<li class="treeview " userKey="">
			<a href="javascript:void('0');">
			<i class="fa fa-cog"></i> <span>接口</span><i class="fa fa-angle-left pull-right"></i>
			</a>
			<ul class="treeview-menu" >
				<li id="sysParamManager-list" class="" userKey=""><a data-pjax="true" href="${ctx}/sendPage/plateform/admin/rule/sysParamManager-list"><i class="fa fa-circle-o"></i>ius配置</a></li>
			</ul>
		</li>
		<li class="treeview " userKey="">
			<a href="javascript:void('0');">
			<i class="fa fa-cog"></i> <span>模板</span><i class="fa fa-angle-left pull-right"></i>
			</a>
			<ul class="treeview-menu" >
				<li id="template-edit" class="" userKey=""><a data-pjax="true" href="${ctx}/sendPage/plateform/admin/rule/template-edit"><i class="fa fa-circle-o"></i>模板编辑</a></li>
				<li id="template-list" class="" userKey=""><a data-pjax="true" href="${ctx}/sendPage/plateform/admin/rule/sysTemplate-list"><i class="fa fa-circle-o"></i>模板管理</a></li>
			</ul>
		</li>
		<li class="treeview " userKey="">
			<a href="javascript:void('0');">
			<i class="fa fa-cog"></i> <span>规则</span><i class="fa fa-angle-left pull-right"></i>
			</a>
			<ul class="treeview-menu" >
				<li id="sysRulesType-list" class="" userKey=""><a data-pjax="true" href="${ctx}/sendPage/plateform/admin/rule/sysRulesType-list"><i class="fa fa-circle-o"></i>规则类型管理</a></li>
				<li id="rules-trpCate" class="" userKey=""><a data-pjax="true" href="${ctx}/sendPage/plateform/admin/sale/sale-trpCate"><i class="fa fa-circle-o"></i>品种规则定义</a></li>
				<li id="sysRulesTemplate-list" class="" userKey=""><a data-pjax="true" href="${ctx}/sendPage/plateform/admin/sys/sysRulesTemplate-list"><i class="fa fa-circle-o"></i>系统规则定义</a></li>
			</ul>
		</li>
		<li class="treeview " userKey="">
			<a href="javascript:void('0');">
			<i class="fa fa-cog"></i> <span>附件</span><i class="fa fa-angle-left pull-right"></i>
			</a>
			<ul class="treeview-menu" >
				<li id="sys-fjlxdy" class="" userKey=""><a data-pjax="true" href="${ctx}/sendPage//plateform/admin/sys/sys-fjlxdy"><i class="fa fa-circle-o"></i>附件类型</a></li>
				<li id="sys-fjdy" class="" userKey=""><a data-pjax="true" href="${ctx}/sendPage//plateform/admin/sys/sys-fjdy"><i class="fa fa-circle-o"></i>附件定义</a></li>
				<li id="sys-fjxinxi" class="" userKey=""><a data-pjax="true" href="${ctx}/sendPage//plateform/admin/sys/sys-fjxinxi"><i class="fa fa-circle-o"></i>附件信息</a></li>
			</ul>
		</li>
        
        
        
      </ul>
    </section>
    <!-- /.sidebar -->
  </aside>
  
  <script>
 function loadCateList(){
 		var lihtml = "";
 		$("#ul-cate-list").html("");
 		$.ajax({
 			   type:'get',
 			   url:common_list_url,
 			   async:false,
 			   data:{"doCode":"dymicSql","modelTypes":"s_trpCate"},
 			   dataType:'json',
 			   success: function(myData){
 			   	console.log(myData);
 			   	if(myData.total>0){
 			   		for(var i=0;i<myData.rows.length;i++){
 			   			var obj = myData.rows[i];
 			   			lihtml +="<li id='"+obj.cateNo+"-list'>";
 			   			lihtml +="<a href='${page_admin}/sale/"+obj.cateNo+"-reg-list'><i class='fa fa-circle-o'></i>"+obj.cateName+"</a>";
     			   		lihtml +="</li>";
 			   		}
 			   		$("#ul-cate-list").html(lihtml);
 			   	}
 			  }
 			});	
 }
 </script>

  <script>
  	 	//part1、注入jquery.pjax 绑定A标签点击事件
      	$(document).pjax("[data-pjax='true'], a[data-pjax='true']", ".content-wrapper", {
       		fragment: ".content-wrapper"
      	});
	  	//$(document).pjax('a', '#pjax-container');
	  	$(document).on("pjax:send", function() { 
			//alert("发送完成");
		}); 
		$(document).on("pjax:complete", function(resultData) { 
	  		//alert("加载完成");
	  		showClickMenu();
		});
		
		//part2、注入jquery.load 绑定A标签load事件
		$("[data-load='true']").each(function(){
			var thisHref = $(this).attr("href");
			$(this).attr("load-url",thisHref);
			$(this).attr("href","javascript:;");
			$(this).click(function(){
				$("#main-body").load(thisHref+" .content-wrapper",function(resultData){
					 //alert(resultData);
					 $result = $(resultData); 
			         $result.find("script").appendTo("#main-body");//保证子页面的js内容能被引入进来
				});
			});
		});
 </script>

